<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="java.io.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
		Runtime runtime = Runtime.getRuntime();
		Process process = null;
		String line = null;
		InputStream is = null;
		InputStreamReader isr = null;
		BufferedReader br = null;
		String ip = "172.18.34.89";
		try {
			process = runtime.exec("ping " + ip);
			is = process.getInputStream();
			isr = new InputStreamReader(is);
			br = new BufferedReader(isr);
			out.println("<pre>");
			while ((line = br.readLine()) != null) {
				out.println(line);
				out.flush();
			}
			out.println("</pre>");
			is.close();
			isr.close();
			br.close();
		} catch (IOException e) {
			out.println(e);
			runtime.exit(1);
		}
	%>
</body>
</html>